<?php
    $arguments['title'] = "楼层";
    $arguments['location'] = array(
        "首页",
        "地图",
        "楼层",
        );
    $arguments['css'] = array(
        PUBLIC_LIB.'css/core/main.css',
        PUBLIC_LIB.'css/biz/table.css',
        PUBLIC_LIB.'css/biz/form.css',
        PUBLIC_LIB.'fonts/hui_iconfont/iconfont.css',
        PUBLIC_LIB.'js/core/Pagination/kkpager_orange.css',
        PUBLIC_LIB.'js/jquery/jquery-ui-1.11.4.custom/jquery-ui.css',
        PUBLIC_LIB.'js/core/fancybox/jquery.fancybox-1.3.4.css',
        );
    $arguments['js'] = array(
        //PUBLIC_LIB.'js/jquery/jquery-1.4.2.min.js',
        PUBLIC_LIB.'js/core/fancybox/jquery-1.7.1.js',
        PUBLIC_LIB.'js/core/Dropdownlist/chosen.jquery.js',
        PUBLIC_LIB.'js/core/Pagination/kkpager.min.js',
        PUBLIC_LIB.'js/biz/pagelist.js', 
        PUBLIC_LIB.'js/core/DatePicker/WdatePicker.js',
        PUBLIC_LIB.'js/biz/custominput.js',  
        PUBLIC_LIB.'js/core/Tooltip/tooltip.js',
        PUBLIC_LIB.'js/jquery/jquery-ui-1.11.4.custom/jquery-ui.js',
        PUBLIC_LIB.'js/biz/ajaxfun.js',
        PUBLIC_LIB.'js/core/fancybox/jquery.fancybox-1.3.4.js',
        PUBLIC_LIB.'js/core/fancybox/jquery.fancybox-1.3.4.pack.js',
        PUBLIC_LIB.'js/biz/floorList.js',      
        );
    
    importHeader($arguments);
?>
    <div class="formtitle"><span>楼层</span></div>
    <div class="search">
    	
        <form action="" method="post" id="form">
        <input type="hidden" id="floorId" name="floorId" value="<?php if(isset($floorId)){echo $floorId->floorId;}?>">
        <p>
            <div class="label_title">
                <label for="style">楼层号：</label>
            </div>
            <div class="search_text">
                <input  type="text" class="dfinput search_width" id="floor_num" name="floor_num" value="<?php if(isset($floorNo)){echo $floorNo;}?>"/>
            </div>
             <div class="label_title">
                <label for="style">楼层：</label>
            </div>
            <div class="search_text">
                <input  type="text" class="dfinput search_width" id="floor" name="floor" value="<?php if(isset($floorName)){echo $floorName;}?>"/>
            </div>
            <button type="button" class="tool tool_left" id="search" style="width:100px;"><i class="Hui-iconfont">&#xe683;</i>查询</button>
            <!-- <div class="tool tool_btn" id="addFloor" style="width:100px;"><i class="Hui-iconfont">&#xe600;</i>新增</div> -->
            <button type="button" class="tool tool_left" id="addFloor" style="width:100px;"><i class="Hui-iconfont">&#xe600;</i>新增</button>
        </p>
    	</form>
    	        
    </div>
    <div class="table_box tablelist">
    	<table width="100%">
            <tr>
            	<th width="20%">楼层</th>
            	<th width="20%">楼层号</th>
                <th width="30%">路点</th>
                <th width="30%">操作</th>
            </tr>
        </table>
        <table width="100%">
        <!-- <tr>
                <td width="20%">wea</td>
                <td width="20%">4</td>
                <td width="30%">44</td>
                <td width="30%">
                    <a href=""><div class="tools tool_left" id="detail"><i class="Hui-iconfont">&#xe695;</i>详情</div></a>
                    <a href=""><div class="tools tool_left" id="floorEdit"><i class="Hui-iconfont">&#xe60c;</i>编辑</div></a>
                    <a ><div class="tools tool_left" id="floorDelete"><i class="Hui-iconfont">&#xe609;</i>删除</div></a>
                    <input type="hidden" id="floor_no" value="">
                    <a href="/Floor/addroad/"><div class="tools tool_left" id="adds"><i class="Hui-iconfont">&#xe6c9;</i>设置路点</div></a>
                </td>
            </tr> -->
        <?php
            if(isset($result)&&!empty($result->list)&&count($result->list)>0){
                foreach($result->list as $content){
        ?>
            <tr>
                <td width="20%"><?php echo $content->floorName;?></td>
                <td width="20%"><?php echo $content->floorNo;?></td>
                <td width="30%"><?php for($i=0;$i<sizeof($content->coord);$i++){echo $content->coord[$i];}?></td>
                <td width="30%">
                    <a href=""><div class="tools tool_left" id="detail"><i class="Hui-iconfont">&#xe695;</i>详情</div></a>
                    <a href=""><div class="tools tool_left" id="floorEdit"><i class="Hui-iconfont">&#xe60c;</i>编辑</div></a>
                    <a href="javascript:floorDelete('<?php echo $content->floorId;?>','<?php echo $content->floorName;?>');"><div class="tools tool_left"><i class="Hui-iconfont">&#xe609;</i>删除</div></a>
                    <a href="/Floor/addRoad/?floorNo=<?php echo $content->floorId;?>"><div class="tools tool_left"><i class="Hui-iconfont">&#xe6c9;</i>设置路点</div></a>
                </td>
            </tr>
        
       <?php
        }
    }else{
       ?>
            <tr><td colspan="8"><?php echo isset($noAuth)?$noAuth:'没有查询到任何楼层信息';?></td></tr>
        <?php
            }
        ?>
        </table>
    </div>

    <div class="pager" id="kkpager" data-total="<?php
    if(empty($result->list)){
        echo 1;
    }else{
        echo $result->page;
    }
    ?>"></div>
    <?php importFooter();?>
